<template>
	<!--这个组件只适用遮罩层没有事件的，（:close-on-masker='false'）-->
	<div id='PopPassword'>
		<yd-popup v-model="showPop" position="center" :close-on-masker='false'>
			<div class="pop_nike_name">
				<div class="title c_size_34_48">请输入6位听课密码</div>
				<div class="label">*听课密码请联系领导人获取*</div>
				<div class="pop_nike_name_input">
					<input @input="changeInput" placeholder="输入密码" oninput="if(value.length>6)value=value.slice(0,6)" type="text" :value="passwordNum" />
				</div>
				<ul class="c_size_34_48">
					<li @click="closePop">取消</li>
					<li @click="postPassword">确定</li>
				</ul>
			</div>
		</yd-popup>
	</div>
</template>

<script>
	import { Popup } from 'vue-ydui/dist/lib.rem/popup';
	export default{
		name:'PopPassword',
		props: {
			showPop:{
				default:false,
			},
			passwordNum:{
				default:'',
			}
		},
		components:{
			[Popup.name]: Popup,
		},
		data(){
			return {
				
			}
		},
		created() {
		},
		watch: {
			
		},
		computed: {
			
		},
		mounted(){
			
		},
		methods:{
			postPassword(){
				this.$emit('postPassword')
			},
			closePop(){
				this.$emit('update:showPop',false)
			},
			changeInput(e){
				this.$emit('update:passwordNum',e.target.value)
			}
		}
	}
</script>

<style lang="scss">
	@import './PopPassword.scss';
</style>